<?
$idauto = $_REQUEST['idauto'];
	require('abrirdb.php');
	$sql = mysql_query("SELECT * FROM perfil_auto WHERE id_perfilauto = '$idauto'");
	$array = mysql_fetch_array($sql);
	$text = '<a href="#" onmouseover="imgarriba.src=\'autos/'.$array['imagen'].'\';"><img src="galeria_auto/'.$array['imagen'].'" width="45" height="45" /></a>&nbsp;';
	$imagebig = 'autos/'.$array['imagen'];
	
	
	$idcliente = $array['id_cliente'];
	require('abrirdb.php');
	$sql2 = mysql_query("select * from perfil_global where id_cliente = '$idcliente'");
	$array2 = mysql_fetch_array($sql2);
	
	require('abrirdb.php');
		$sql3 = mysql_query("SELECT * FROM galeria_auto WHERE id_perfilauto = '$idauto'");
		while($array3 = mysql_fetch_array($sql3))
		{ $text .= '
		<a href="#" onmouseover="imgarriba.src=\'galeria_auto/'.$array3['imagen'].'\';"><img src="galeria_auto/'.$array3['imagen'].'" width="45" height="45" /></a>&nbsp;'; }
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Autos Y Refacciones</title>
<script type="text/javascript" src="js/jquery-1.2.6.js"></script>
<link rel="stylesheet" type="text/css" href="js/jqgal/style22.css" media="screen" />
<script src="js/jqgal/jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="js/jqgal/simple_thumbs.js" type="text/javascript"></script>
</head>
<body><form action="" method="post">
<table width="600" border="0" cellspacing="0" cellpadding="0" align="center">
	<tr><td width="400" align="left" height="300"><img src="<?=$imagebig;?>" width="400" height="300" name="imgarriba"/></td>
	  <td width="200">
		<table width="100%" border="0" cellspacing="0" cellpadding="0" class="gray12">
			<tr><td height="21" align="right"><strong>Marca:</strong></td><td>&nbsp;<?=$array['marca'];?></td></tr>
			<tr><td height="21" align="right"><strong>Modelo:</strong></td><td>&nbsp;<?=$array['modelo'];?></td></tr>
			<tr><td height="21" align="right"><strong>Año:</strong></td><td>&nbsp;<?=$array['anio'];?></td></tr>
			<tr><td height="21" align="right"><strong>Transmisión:</strong></td><td>&nbsp;<?=$array['transmision'];?></td></tr>
			<tr><td height="21" align="right"><strong>Ubicación:</strong></td><td>&nbsp;<?=$array['ubicacion'];?></td></tr>
			<tr><td height="21" align="right"><strong>Precio:</strong></td><td>&nbsp;$<?=number_format($array['precio'],2,'.',',');?></td></tr>
			<tr><td colspan="2" align="center"><strong></strong><?=$array2['titulo'];?></strong></td></tr>
            <tr><td width="41%">&nbsp;</td><td width="59%">&nbsp;</td></tr>
		</table>
		<div align="center"><br /><img src="imagenes/logo_mini.png" /></div></td></tr>
	<tr><td colspan="2" height="55" style="vertical-align:middle"><?=$text;?></td></tr>
</table></form>
</body>
</html>